﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Search_List.aspx.cs" Inherits="DocumentManage_Search_List" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
     <link rel="stylesheet" href="../css/css.CSS"  type="text/css" />
    <script src="../Js/tableSelect.js" type ="text/javascript"></script>
    <!--#include file="../Js/Button.js"-->
    <script src="../Js/Common.js" type ="text/javascript"></script>
    <script src="../Js/calendar.js" type ="text/javascript"></script>
    <script language ="javascript" type ="text/javascript" >
  function document.onkeydown()     
  {
      var   e=event.srcElement; 
      if(event.keyCode==13)
      {
         return   false; 
      }
  }
  
  function EditNews_click()
    {
    var HiddenID=document.getElementById('HiddenID').value;
    if(isNull(HiddenID))
    {
        alert("请选择一条记录!");
        return false;
    }
    var url="NewsFrom.aspx?EditStatus=2&ID=" + HiddenID;
    
     //var sFeatures='height=400, width=600, top=200, left=250,toolbar=0, menubar=0, scrollbars=yes, resizable=1, location=0, status=0';
     window.open(url,"_self","");
     }
    
        //文件夹选择
     var sChoiceID;               //所在赋值的关键字
     var ChoiceNameInfo;          //选择的名称集合
     var ChoiceIDInfo;            //选择的ID集合
     var iChoicePoNumber1 =0;     //0表示任意多,其它的正整数为可以选择的最大个数.不可以为负数

    function GetMyFolderTree(obj)
    {
        var sFeatures = "dialogHeight:600px;dialogWidth:500px;resizeable:no;help:no;status:no";
        var obj = showModalDialog("../Common/ChoiceFolders.aspx?ChoiceID="+obj,window,sFeatures); 
        if(obj != undefined)
         {
             sChoiceID = obj.sChoiceID;
             ChoiceNameInfo = obj.ChoiceNameInfo;
             ChoiceIDInfo=obj.ChoiceIDInfo;            
             eval("form1.ChoiceName_"+sChoiceID+".value="+ChoiceNameInfo+";");
             eval("form1.HChoiceID_"+sChoiceID+".value="+ChoiceIDInfo+";");
             eval("form1.ChoiceName_"+sChoiceID+".blur()");
         }
    }
    </script> 
    
    	<script type="text/javascript" language="JavaScript">
	 
		function CheckFormMenu()
		{		
		  var sID = parent.LeftFrame.hidform.HID.value;
		  if(sID == "")
		  {
		      alert("请选择左边的树");
		      return;
		  }
		  else
		  {
		     var btnSave=window.document.getElementById("btnSearch");
		     if(btnSave!=null)
		     btnSave.click();
		  }
		}
			
	</script>


</head>
<body style =" background-image :url('../images/hit_bg.gif');"> 
    <% 
		Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
		Response.Expires = 0;
		Response.CacheControl = "no-cache";
	%>
    <form id="form1" runat="server">
    <div>

<table style ="width :98%;"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr style ="height :5;">
    <td></td>
 </tr> 
</table>
       <table width="98%" border="0" cellpadding="0" cellspacing="0" class="table" align="center" >
        <tr> 
          <td colspan="6" align="center" valign="top" style="height: 300px; width :100%;">
           <!--搜索开始-->
              <table style="width :100%;" border="0" align="center" cellpadding="1" cellspacing="1">
				<tr> 
				  <td  valign="top" style="width :100%;">
					<table style="width :100%;" border="0" cellpadding="0" cellspacing="0">
					  <tr style ="height :30px;">
						<td colspan ="2" >
						文档名称：<asp:TextBox ID="Name" runat="server"  TabIndex="3" Width="200"></asp:TextBox>
						文件夹： <input id="ChoiceName_1" size ="20" runat="server" onclick ="GetMyFolderTree(1)" />
						         <input type ="hidden"  id="HChoiceID_1" size ="15" runat ="server"  />
						上传日期：<asp:CheckBox id="ChoiceDt" Checked ="true"  runat ="server" onclick ="if(this.checked==true){ifChoiceDt.style.display='';AllDt.style.display='none';LDt.value='';}else{ifChoiceDt.style.display='none';AllDt.style.display='';LDt.value = '全部日期';} "  />
						       <span id="ifChoiceDt" style="DISPLAY:none ;" runat ="server" ><asp:TextBox ID="SDT" runat="server" onclick="calendardate(this,true);"  TabIndex="3" Width="80"></asp:TextBox>
						          <asp:TextBox ID="EDT"  runat="server" onclick="calendardate(this,true);" TabIndex="3" Width="80"></asp:TextBox></span>
						       <span id="AllDt"  style="DISPLAY:none ;"  runat ="server" ><input type="text" size ="10" id="LDt" runat ="server"  /></span></td>
					  </tr>
					  <tr style ="height :30px;">
						<td >
						区域：<asp:DropDownList ID="ddlRegionid" DataTextField ="sName" DataValueField ="id" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlRegionid_SelectedIndexChanged" ></asp:DropDownList>
						机房：<asp:DropDownList ID="ddlMachineid" DataTextField ="mroom_name" DataValueField ="mroom_id" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlMachineid_SelectedIndexChanged" ></asp:DropDownList>
						网元：<asp:DropDownList ID="ddlnetwork" DataTextField ="netw_name" DataValueField ="netw_id" runat="server" ></asp:DropDownList>
						项目：<asp:DropDownList ID="ddlProject" DataTextField ="project_name" DataValueField ="project_id" runat="server" ></asp:DropDownList></td>
						<td  style ="width :150px;">
						
						<!--<input type="button" id="Button1" value="查询(F)" accesskey ="F" class="button02" onclick="CheckFormMenu();" />-->
						<asp:Button ID="btnSearch" runat="server"   cssclass="button03" Text="查询" /></td>
					  </tr>
					</table> 
				   </td>
				</tr>
				<tr style ="height :1; background-color :#dddddd;">
                  <td></td>
                </tr> 
			</table>
			<!--搜索结束-->

          <!--列表开始 OnRowCommand="GridView1_RowCommand" -->
   <asp:GridView ID="GridView1" runat="server" Width="100%" DataKeyNames="id" OnRowDataBound="GridView1_RowDataBound"
    ForeColor="#333333" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"  PageSize="20" EmptyDataText="没搜索到相匹配的数据"  BorderColor="#F9F9FB" BorderStyle="Dotted" GridLines="Vertical"  >        
    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="#F9F9FB" />
    <RowStyle BackColor="#F9F9FB" ForeColor="#333333" Height="24px"  BorderStyle="Dotted" />
    <AlternatingRowStyle BackColor="#EFEFF8" />
    <HeaderStyle BackColor="#E3E7F0" Height="25px" />
                <PagerTemplate>
                    <table width="100%" datapagesize="5">
                        <tr>
                            <td align="right">
                                <asp:LinkButton CommandName="Page" CommandArgument="First" ID="linkBtnFirst" runat="server">首页</asp:LinkButton>
                                <asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="linkBtnPrev" runat="server">上一页</asp:LinkButton>
                                <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="linkBtnNext" runat="server">下一页</asp:LinkButton>
                                <asp:LinkButton CommandName="Page" CommandArgument="Last" ID="linkBtnLast" runat="server">尾页</asp:LinkButton>
                                <asp:TextBox ID="txtGoPage" class="INPUT" runat="server" MaxLength="5" Width="15px"></asp:TextBox>
                                <asp:LinkButton ID="linkBtnGo" runat="server" OnClick="linkBtnGo_Click">跳转</asp:LinkButton>
                                <asp:Label ID="labMessage" runat="server" ForeColor="Red"></asp:Label></td>
                            <td width="30%" align="right">
                                <asp:Label ID="CurrentPageLabel" runat="server" ForeColor="Blue" Text="第1页 共5页 共89条"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </PagerTemplate>
                <Columns>
                    <asp:BoundField DataField="FolderName" HeaderText="文件夹" SortExpression="FolderName">
                        <ItemStyle Width="8%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Name" HeaderText="文档名称" SortExpression="Name">
                        <ItemStyle  HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="VersionNumber" HeaderText="版本号" SortExpression="VersionNumber">
                        <ItemStyle Width="10%" HorizontalAlign="Left" />
                    </asp:BoundField> 
                    <asp:BoundField DataField="regionName" HeaderText="区域" SortExpression="regionName">
                        <ItemStyle Width="10%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MachineRoomName" HeaderText="机房" SortExpression="MachineRoomName">
                        <ItemStyle Width="8%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="NetWorkName" HeaderText="网元" SortExpression="NetWorkName">
                        <ItemStyle Width="8%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ProjectName" HeaderText="项目" SortExpression="ProjectName">
                        <ItemStyle Width="8%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FileExtension" HeaderText="文档类型" SortExpression="FileExtension">
                        <ItemStyle Width="8%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FileCreatDT" HeaderText="上传日期" SortExpression="FileCreatDT" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False">
                        <ItemStyle Width="10%" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="StatusName" HeaderText="文档状态" SortExpression="StatusName" HtmlEncode ="false" >
                        <ItemStyle Width="8%" HorizontalAlign="Left" />
                    </asp:BoundField>                    
                </Columns>
            </asp:GridView>
           <!--列表结束-->
                <asp:Label ID="LabMessage" runat="server" ForeColor="Red"></asp:Label>
                <input type="hidden" id="HiddenID" name="HiddenID" runat="server" />
                <input type="hidden" id="HiddenWidth" name="HiddenWidth" value = "600"  runat="server" />
                <input type="hidden" id="HiddenHeight" name="HiddenHeight" value="480"  runat="server" />
               
                <input type="hidden" id="HID" runat ="server"  />
                <input type="hidden" id="HPath" runat ="server"  />
                
                <input type="hidden" id="HChoiceID" runat ="server" />
           </td>
         </tr>
       </table>     
    </div>
    </form>
</body>
</html>
